<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>My Project: cTerrain类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>变量</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a>  </div>
  <div class="headertitle">
<div class="title">cTerrain类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>用三张纹理图，一张混合图，一张高度图，创建地形。  
 <a href="classc_terrain.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="c_terrain_8h_source.html">cTerrain.h</a>&gt;</code></p>

<p><a href="classc_terrain-members.html">所有成员列表.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:af7bdc05fe8b5ef8c3e0e2ce9aa386bef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classc_terrain.html#af7bdc05fe8b5ef8c3e0e2ce9aa386bef">init</a> (<a class="el" href="classc_render.html">cRender</a> *pRender, <a class="el" href="struct_terrain.html">Terrain</a> terrain, string HeightMap, string StoneTex, string GrassTex, string DirtTex, string BlendMap, float HeightScal, float HeightOffset, string FxName=&quot;Terrain.fx&quot;)</td></tr>
<tr class="memitem:a1afbf85773459c997ebb93e08d0242db"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1afbf85773459c997ebb93e08d0242db"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (D3DXMATRIX &amp;world, D3DXMATRIX &amp;view, D3DXMATRIX &amp;proj, D3DXVECTOR3 LightDir=D3DXVECTOR3(0, 1, 0), float AmbientEssentially=1.0f)</td></tr>
<tr class="memitem:a984f8165e4d3bab98148a2d02adc07fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a984f8165e4d3bab98148a2d02adc07fb"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classc_terrain.html#a984f8165e4d3bab98148a2d02adc07fb">getY</a> (float x, float z)</td></tr>
<tr class="memdesc:a984f8165e4d3bab98148a2d02adc07fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">给出x,z;得到高度y。 <br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a04e07a34583ee60050ca8642f01be5e8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04e07a34583ee60050ca8642f01be5e8"></a>
<a class="el" href="struct_terrain.html">Terrain</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_Terrain</b></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:ab2dbf56bc13db8b4e6f64bd9bec79fd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2dbf56bc13db8b4e6f64bd9bec79fd9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>shader_draw</b> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a647312e8a8660ea85aac8ebce42bf7b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a647312e8a8660ea85aac8ebce42bf7b9"></a>
<a class="el" href="classc_height_map.html">cHeightMap</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_HeightMapObject</b></td></tr>
<tr class="memitem:a3e1987eceda1bb92af4c758e0fcf5f17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e1987eceda1bb92af4c758e0fcf5f17"></a>
<a class="el" href="classc_vertex_decl.html">cVertexDecl</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>m_pVertexDecl</b></td></tr>
<tr class="memitem:af964382aa0b38fc8de7c3c30a1a8aa9f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af964382aa0b38fc8de7c3c30a1a8aa9f"></a>
<a class="el" href="classc_fx.html">cFx</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>m_pFx</b></td></tr>
<tr class="memitem:abf6d1f7f13ef26aef3e48c2df9a0d54a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf6d1f7f13ef26aef3e48c2df9a0d54a"></a>
<a class="el" href="classc_ground.html">cGround</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>m_pGround</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>详细描述</h2>
<div class="textblock"><p>用三张纹理图，一张混合图，一张高度图，创建地形。 </p>
<dl class="section remark"><dt>备注:</dt><dd>只能通过Shader渲染。依赖cGround。 </dd></dl>
</div><hr/><h2>成员函数说明</h2>
<a class="anchor" id="af7bdc05fe8b5ef8c3e0e2ce9aa386bef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cTerrain::init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classc_render.html">cRender</a> *&#160;</td>
          <td class="paramname"><em>pRender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a>&#160;</td>
          <td class="paramname"><em>terrain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>HeightMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>StoneTex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>GrassTex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>DirtTex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>BlendMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>HeightScal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>HeightOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>FxName</em> = <code>&quot;Terrain.fx&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>参数:</dt><dd>
  <table class="params">
    <tr><td class="paramname">HeightScal,:</td><td>高度数据乘HeightScal。 </td></tr>
    <tr><td class="paramname">HeightOffset,:</td><td>高度数据加HeightOffset。 </td></tr>
    <tr><td class="paramname">FxName,:</td><td>地形的特效文件。 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>E:/!代码工厂/3D引擎/<a class="el" href="c_terrain_8h_source.html">cTerrain.h</a></li>
<li>E:/!代码工厂/3D引擎/cTerrain.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2012年 五月 27日 星期日 22:27:19 , 为 My Project使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1
</small></address>
</body>
</html>
